﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CurrInHosp_ByDiag_Item.aspx.cs" Inherits="Page_AutoUpdate_CurrInHosp_ByDiag_Item" %>

<!doctype html>

<html class="今日在院患者列表">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <link href="../../CSS/my-order.1.css" rel="stylesheet" />
    <script src="../../Scripts/WebForms/Common.js"></script>
    <link href="../../CSS/m.css" rel="stylesheet" />
    <link href="../../CSS/MyTest.css" rel="stylesheet" />
    <script src="../../Scripts/jquery-1.8.0.min.js"></script>
    <title>当前在院患者列表</title>
    <style>
        .table_data_details tbody tr th, td
        {
            height: auto;
            width: 64px;
            font-size: 12px;
            text-align: center;
                color: grey;
        }
    </style>
</head>
<body>
    <section class="jump_patient_select">
        <table class="table_data_details">
            <colgroup>
                <col width="12%">
                <col width="5%">
                <col width="12%">
                <col width="12%">
                <col width="7%">
                <col width="15%">
            </colgroup>
            <tbody>
            </tbody>
        </table>
    </section>
     <div class="noneDate" style="text-align: center; margin-top: 30%; display:none;" >
        <p>今日在院患者~</p>
    </div>
    <script type="text/javascript">
        $().ready(function () {
            GetList();

        });
        function GetList() {
            $.post("/Handler/AutoUpdateHandler.ashx?action=GetCurrInHosp_ByDiag_Item", { KEY: '<%=Key%>', DiagOrgId: '<%=DiagOrgId%>' }, function (data) {
                var html = "";
                var allTr = "";
                var list = eval("(" + data + ")").List;
                if (typeof (list) != "undefined") {
                    var temp = '<tr>'
                                    + '<th>姓名</th>'
                                    + '<th>性别</th>'
                                    + '<th>科室</th>'
                                    + '<th>病区</th>'
                                    + '<th>床号</th>'
                                     + '<th>住院号</th>'
                                + 'tr';


                    for (var i = 0; i < list.length; i++) {
                        var childTemp = '<tr>'
                                        + '<td>{PatiName}</td>'
                                        + '<td>{SexName}</td>'
                                        + '<td>{ORGName_Diag}</td>'
                                        + '<td>{ORGName_Loc}</td>'
                                        + '<td>{BedDes}</td>'
                                        + '<td>{InPatiID}</td>'
                                      + '</tr>';
                        allTr += childTemp.replace(/{PatiName}/, list[i].PatiName)
                        .replace(/{SexName}/, list[i].SexName)
                        .replace(/{ORGName_Diag}/, list[i].ORGName_Diag)
                        .replace(/{ORGName_Loc}/, list[i].ORGName_Loc)
                        .replace(/{BedDes}/, list[i].BedDes)
                        .replace(/{InPatiID}/, list[i].InPatiID);
                    }
                    html = temp + allTr;
                    $(".table_data_details tbody").append(html);
                    $(".jump_patient_select").show();
                }
            });
        }
    </script>
</body>
</html>
